package com.handsome.状态模式;

/**
 * 不能抽奖的状态
 * @author niechun
 * @date 2023/3/26 16:45
 */
public class NoRaffleState implements State{

    RaffleActivity activity;

    public NoRaffleState(RaffleActivity activity) {
        this.activity = activity;
    }

    @Override
    public void deduce() {
        System.out.println("扣除50积分，可以抽奖了");
        activity.setState(activity.getCanRaffleState());
    }

    @Override
    public boolean raffle() {
        System.out.println("扣除积分才能抽奖");
        return false;
    }

    @Override
    public void dispensePrize() {
        System.out.println("不能发放奖品");
    }
}
